home *** CD-ROM | disk | FTP | other *** search
/ Click Press Kit / Click Press Kit.iso / mac / QuickTime704.pkg / Contents / QuickTime.dist < prev    next >
Encoding:
Extensible Markup Language  |  2005-12-20  |  3.9 KB  |  155 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <installer-gui-script minSpecVersion='1'>
  3.  
  4. <!-- Automatically generated by update2dist -->
  5.  
  6.     <!-- Installer meta-data -->
  7.     <choices-outline>
  8.         <line choice='manual'/>
  9.     </choices-outline>
  10.  
  11.     <title>QuickTime</title>
  12.     <choice id='manual' title="QuickTime">
  13.         <pkg-ref id='manual' auth='Root' onConclusion='RequireRestart'>.</pkg-ref>
  14.     </choice>
  15.     <choice id='manual' title='MANUAL_TITLE'/>
  16.     <choice id='manual' versStr='SU_VERS' />
  17.        <welcome file="Welcome.rtf"/>
  18.     <readme  file="ReadMe.rtfd"/>
  19.     <license file="License.rtf"/>
  20.     
  21.     <options    customize = 'never'
  22.     />
  23.     
  24.     <background file="background.tif" scaling="none" alignment="bottomleft"></background>
  25.     <!-- Software Update meta-data -->
  26.     <choices-outline ui='SoftwareUpdate'>
  27.         <line choice='su'/>
  28.     </choices-outline>
  29.  
  30.     <choice id='su' suDisabledGroupID='QuickTime'>
  31.         <pkg-ref id='auto' onConclusion='RequireRestart'>QuickTime704.pkg</pkg-ref>
  32.     </choice>
  33.     <choice id='su' visible='VisibleCheck()' />
  34.     <choice id='su' title='SU_TITLE' versStr='SU_VERSION' />
  35.     <choice id='su' description='SU_DESCRIPTION' description-mime-type='text/html' />
  36.     
  37.  
  38.     <installation-check script="InstallationCheck()" />    
  39.     <volume-check script="VolumeCheck()" />    
  40.  
  41.     <script>
  42.     function InstallationCheck()
  43.     {
  44.         // note: my.target isn't defined under installation-check
  45.         if (true)
  46.             return true;
  47.  
  48.         if (my.result)
  49.         {
  50.             //my.result.message = 'message';    // XXX
  51.             my.result.type = 'Fatal';
  52.         }
  53.         return false;
  54.     }
  55.  
  56.     function VolumeCheck()
  57.     {
  58.         
  59.         if(my.target.mountpoint != '/'){
  60.             my.result.message = system.localizedString('BOOT_VOLUME_ERR');
  61.             my.result.type = 'Fatal';
  62.             return false;
  63.         }
  64.         if (newerQuickTimePresent()) {
  65.             my.result.type = 'Fatal';
  66.             my.result.message = system.localizedStringWithFormat('isDowngrade');
  67.             return false;            
  68.         }
  69.         if (!noAppleTier3Language()) {
  70.             my.result.type = 'Fatal';
  71.             my.result.message = system.localizedStringWithFormat('volumeHasTier3');
  72.             return false;            
  73.         }
  74.         return true;
  75.     }
  76.  
  77.  
  78.     function VisibleCheck()
  79.     {
  80.         return(noAppleTier3Language() && notAlreadyInstalled());
  81.     }
  82.  
  83.  
  84.  
  85. function noAppleTier3Language()
  86. {
  87.  
  88.     var path = my.target.mountpoint + "/var/db/.AppleTier3Language";
  89.     if (!system.files.fileExistsAtPath(path))
  90.         return true;
  91.     
  92.     return false;
  93. }
  94.  
  95. function newerQuickTimePresent()
  96. {
  97.     var path = my.target.mountpoint + "/System/Library/Frameworks/QuickTime.framework";
  98.     var bundle = system.files.bundleAtPath(path);
  99.     var version = BundleGetCompositeVersion5(bundle);
  100.     if (version && (system.compareVersions(version, "7.0.4.999999999.999999999") < 1)) {
  101.         return false;
  102.     }
  103.     return true;
  104. }
  105. function notAlreadyInstalled()
  106. {
  107.     var path = my.target.mountpoint + "/System/Library/Frameworks/QuickTime.framework";
  108.     var bundle = system.files.bundleAtPath(path);
  109.     var version = BundleGetCompositeVersion5(bundle);
  110.     if (version && (system.compareVersions(version, "7.0.4.0.0") < 1)) {
  111.         return true;
  112.     }
  113.     return false;
  114. }
  115.     
  116.     </script>
  117.  
  118.     <!-- Common include -->
  119.     <script>
  120.     function _PadVersionString(version, tupleCount)
  121.     {
  122.         if (version == null)
  123.             version = "0";
  124.         var components = version.split(".");
  125.         if (components.length > tupleCount)
  126.             components = components.slice(0, tupleCount);
  127.         else
  128.             for (; components.length<tupleCount; )
  129.                 components.push("0");
  130.         return components.join(".");
  131.     }
  132.  
  133.     function BundleGetCompositeVersion5(bundle)
  134.     {
  135.         if (bundle == null)
  136.             return null;
  137.         var shortVers = bundle.CFBundleShortVersionString;
  138.         shortVers = _PadVersionString(shortVers, 3);
  139.         var sourceVers = bundle.SourceVersion;
  140.         sourceVers = _PadVersionString(sourceVers, 1);
  141.         var buildVers = bundle.BuildVersion;
  142.         buildVers = _PadVersionString(buildVers, 1);
  143.         var fiveTupleVers = shortVers + "." + sourceVers + "." + buildVers;
  144.         return fiveTupleVers;
  145.     }
  146.  
  147.     </script>
  148.     
  149.     
  150.  
  151.  
  152.     <pkg-ref id='auto' installKBytes='124404' version='7.0.4.1150000.359'/>
  153.     <pkg-ref id='manual' installKBytes='124404' version='7.0.4.1150000.359'/>
  154. </installer-gui-script>
  155.